package com.woniuxy.consume;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class WorkConsume {
    @RabbitListener(queues = "workQueue")
    public void receive(String msg){
        System.out.println("消费者接受到消息；"+msg);
    }

    @RabbitListener(queues = "workQueue")
    public void receiveB(String msg){
        System.out.println("消费者B接受到消息；"+msg);
    }
}
